package com.tensquare.rabbit.customer;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @BelongsProject: tensquare_parent
 * @BelongsPackage: com.tensquare.rabbit.customer
 * @Author: yang
 * @CreateTime: 2019-03-11 13:26
 * @Description: ${Description}
 */


@Component  //扔进容器
@RabbitListener(queues = "kudingyu")  //要是消费者 必须加的注解
public class Customer3 {

    @RabbitHandler
    public void getMsg(String msg){
        System.out.println("kudingyu:"+msg);
    }
}
